//
//  Triangle.m
//  Coffee
//
//  Created by sabhanayagam b on 6/1/11.
//  Copyright 2011 Cognizant. All rights reserved.
//

#import "Triangle.h"


@implementation Triangle

-(void) dealloc
{	
	// The Layer will be gone now, to avoid crashes on further access it needs to be nil.
	// don't forget to call "super dealloc"
	[super dealloc];
}


-(Triangle*) initWithSquareSize:(CGSize)wd
{
	if ((self = [super init])) {
		CGPoint _triangle[] = { CGPointMake(0.0f, 0.0f),
			CGPointMake(1.0f, 0.0f),
			CGPointMake(0.5f, 0.5f)
		};
		[self initWithvertices:_triangle count:3 size:wd];
		[self defineSize];
	}
	
	return self;
	
}

@end
